class Translator {
    constructor() {
        this.translate();
        setTimeout(() => {
            this.setBilingualBody()
        }, 3000)
        setTimeout(() => {
            this.setTranslatedBody()
        }, 6000)
        setTimeout(() => {
            this.setOriginBody()
        }, 9000)
    }
    private originBody: HTMLElement = document.body
    private bilingualBody: HTMLElement = document.createElement('body')
    private translatedBody: HTMLElement = document.createElement('body')

    translate() {
        this.bilingualBody.innerText = '青岛'
        this.translatedBody.innerText = '雪津'
    }
    setBilingualBody() {
        document.body = this.bilingualBody
    }
    setTranslatedBody() {
        document.body = this.translatedBody
    }
    setOriginBody() {
        document.body = this.originBody
    }
}

new Translator()